<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
	function check(){
		var form = document.registerForm;
		if(form.login_name.value==""){
			alert("<?php echo h(_T('ui_r_login_name_c1')); ?>");
			return false;
		}
		if(form.password.value==""){
			alert("<?php echo h(_T('ui_r_password_c1')); ?>");
			return false;
		}
		if(form.password.value!=form.password_re.value){
			alert("<?php echo h(_T('ui_r_password_c2')); ?>");
			return false;
		}
		var regex = /^(([\-\w]+)\.?)+@(([\-\w]+)\.?)+\.[a-zA-Z]{2,4}$/;
		if(!regex.test(form.email.value)){
			alert("<?php echo h(_T('ui_r_email_c')); ?>");
			return false;
		}
		if(form.question.value==""){
			alert("<?php echo h(_T('ui_r_question_c')); ?>");
			return false;
		}
		if(form.answer.value==""){
			alert("<?php echo h(_T('ui_r_answer_c')); ?>");
			return false;
		}
		return true;
	}
</script>
</head>
<body>
<form name="registerForm" action="<?php echo url('Register','Save'); ?>" method="POST" onsubmit="return check();">
<table>
<tr>
<td><?php echo h(_T('ui_r_login_name')); ?>:</td>
<td><input type="text" name="login_name" size="30" maxlength="50"/>*</td>
</tr>
<tr>
<td><?php echo h(_T('ui_r_password')); ?>:</td>
<td><input type="password" name="password" size="32" maxlength="50"/>*</td>
</tr>
<tr>
<td><?php echo h(_T('ui_r_password_re')); ?>:</td>
<td><input type="password" name="password_re" size="32" maxlength="50"/>*</td>
</tr>
<tr>
<td><?php echo h(_T('ui_r_email')); ?>:</td>
<td><input type="text" name="email" size="30" maxlength="100"/>*</td>
</tr>
<tr>
<td><?php echo h(_T('ui_r_question')); ?>:</td>
<td><input type="text" name="question" size="30" maxlength="255"/>*</td>
</tr>
<tr>
<td><?php echo h(_T('ui_r_answer')); ?>:</td>
<td><input type="text" name="answer" size="30" maxlength="255"/>*</td>
</tr>
<tr>
<td><?php echo h(_T('ui_r_type')); ?>:</td>
<td>
<select name="type">
<option value="0"><?php echo h(_T('ui_r_type0')); ?></option>
<option value="1"><?php echo h(_T('ui_r_type1')); ?></option>
</select>
</td>
</tr>
<tr>
<td><input type="submit" value="<?php echo h(_T('ui_r_submit')); ?>"/></td>
<td><input type="reset" value="<?php echo h(_T('ui_r_reset')); ?>"/></td>
</tr>
</table>
</form>

</body>
</html>
